_require local "../../../basis.smi"
_require local "./Utility.smi"
_require "./Ast.smi"
_require local "./FormatTemplate.smi"
_require local "./FORMATTER_GENERATOR.sig"

structure FormatterGenerator =
struct
  type formatterEnv (= ->)
  exception GenerationError of string * (int * int)
  val initialFormatterEnv : formatterEnv
  val addToFormatterEnv :
      formatterEnv -> string option * string * string -> formatterEnv
  val generateForDataTypeDec :
      formatterEnv ->
      Ast.region * Ast.dec ->
      (string option * string) list * formatterEnv
  val generateForTypeDec :
      formatterEnv ->
      Ast.region * Ast.dec ->
      (string option * string) list * formatterEnv
  val generateForExceptionDec :
      formatterEnv ->
      Ast.region * Ast.dec ->
      (string option * string) list * formatterEnv
end
